<?php
/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam																	/
/	Created by:		Broadcastweb.eu - Paules												/
/	Site:			http://www.broadcastweb.eu												/
/	Email:			support@broadcastweb.eu													/
/	Copyright:		2011 - 2012 (c) Broadcastweb.eu											/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0003																	/
/																							/
/========================================== JooSam ========================================*/
// Joomla security
defined('_JEXEC') or die;

// Import Joomla Data
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
?>

<script>
	Joomla.submitbutton = function(task){if(task == 'reqevt.cancel' || document.formvalidator.isValid(document.id('reqevt-form'))){Joomla.submitform(task, document.getElementById('reqevt-form'));}else{alert("<?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_003'); ?>");}return false;}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_joosam&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="reqevt-form" class="form-validate">
	<div>
	<?php foreach($this->form->getFieldset('hiddendata') as $field): ?>
		<?php echo $field->label;echo $field->input;?>
	<?php endforeach; ?>
	</div>
	<table>
		<tbody>
			<tr>
				<td style="height:200px;">
					<fieldset class="panelform jsm_fieldset" style="height:100%;">
						<legend><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_004'); ?></legend>
						<ul class="adminformlist" style="height:100%;">
							<?php foreach($this->form->getFieldset('admonly') as $field): ?>
							<li style="margin:0;padding:0;min-height:26px;"><?php echo $field->label;echo $field->input;?></li>
							<?php endforeach; ?>
						</ul>
					</fieldset>
				</td>
				<td style="height:200px;">
					<fieldset class="panelform jsm_fieldset" style="height:100%;">
						<legend><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_005'); ?></legend>
						<ul class="adminformlist" style="height:100%;">
							<?php foreach($this->form->getFieldset('modevent') as $field): ?>
							<li style="margin:0;padding:0;min-height:26px;"><?php echo $field->label;echo $field->input;?></li>
							<?php endforeach; ?>
						</ul>
					</fieldset>
				</td>
			</tr>
			<tr>
				<td style="height:200px;">
					<fieldset class="panelform jsm_fieldset" style="height:100%;">
						<legend><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_006'); ?></legend>
						<ul class="adminformlist" style="height:100%;">
							<?php foreach($this->form->getFieldset('reqoptions') as $field): ?>
							<li style="margin:0;padding:0;min-height:26px;"><?php echo $field->label;echo $field->input;?></li>
							<?php endforeach; ?>
						</ul>
					</fieldset>
				</td>
				<td style="height:200px;">
					<fieldset class="panelform jsm_fieldset" style="height:100%;">
						<legend><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_007'); ?></legend>
						<ul class="adminformlist" style="height:100%;">
							<?php foreach($this->form->getFieldset('reqpagetext') as $field): ?>
							<li style="margin:0;padding:0;min-height:26px;"><?php echo $field->input;?></li>
							<?php endforeach; ?>
						</ul>
					</fieldset>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<fieldset class="panelform jsm_fieldset" style="height:100%;">
					<legend><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_008'); ?></legend>
					<table>
						<tr>
							<td>
								<ul class="adminformlist" style="height:100%;">
									<?php foreach($this->form->getFieldset('extrinfolayout') as $field): ?>
										<li style="margin:0;padding:0;min-height:26px;"><?php echo $field->input;?></li>
									<?php endforeach; ?>
								</ul>
								Preview:
								<pre id="htmlpreview" style="width:550px;border:1px solid silver; background:#FFFFFF; overflow:auto;">
								</pre>
							</td>
							<td>
								<p><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_009'); ?></p>
								<p><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_010'); ?></p>
								<table>
									<tr><td>{jsm_loadimage}		</td><td><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_011'); ?></td></tr>
									<tr><td>{jsm_loadtitle}		</td><td><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_012'); ?></td></tr>
									<tr><td>{jsm_loadartist}	</td><td><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_013'); ?></td></tr>
									<tr><td>{jsm_loadsongtext}	</td><td><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_014'); ?></td></tr>
									<tr><td>{jsm_loadplayed}	</td><td><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_015'); ?></td></tr>
									<tr><td>{jsm_loadrating}	</td><td><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_016'); ?></td></tr>
									<tr><td>{jsm_loaddescr}		</td><td><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_017'); ?></td></tr>
									<tr><td>{jsm_loadduration}	</td><td><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_018'); ?></td></tr>
									<tr><td>{jsm_loadbuybutton}	</td><td><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_019'); ?></td></tr>
									<tr><td>{jsm_loadrequest}	</td><td><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_020'); ?></td></tr>
								</table>
								<p><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_021'); ?></p>
								<pre style="width:550px;border:1px solid silver; background:#FFFFFF; overflow:auto;"><?php
									$str1 = '
<style>
	#jsm_info #img_load{
		float:left;
	}
</style>
<div id="jsm_info">
	<div id="img_load">{jsm_loadimage}</div>
	<div id="songdata">
		<table id="data">
			<tr><td>Title:</td><td colspan="3">{jsm_loadtitle}</td></tr>
			<tr><td>Artist:</td><td colspan="3">{jsm_loadartist}</td></tr>
			<tr><td>Duration:</td><td>{jsm_loadduration}</td><td>Rating:</td><td>{jsm_loadrating}</td></tr>
			<tr><td colspan="4">{jsm_loadbuybutton}{jsm_loadrequest}</td></tr>
		</table>
	</div>
	<div id="lycris">
		<fieldset>
			<legend>Lyrics</legend>
			{jsm_loadsongtext}
		</fieldset>
	</div>
</div>
									';
									echo htmlentities($str1); ?>
								</pre>
							</td>
						</tr>
					</table>
					</fieldset>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<fieldset class="panelform jsm_fieldset" style="height:100%;">
						<legend><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_022'); ?></legend>
						<table class="adminlist">
							<thead>
								<tr>
									<th><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_023'); ?></th>
									<th width="100"><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_024'); ?></th>
									<th width="100"><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_025'); ?></th>
								</tr>
							</thead>
							<tbody><?php
								if(is_array($this->samcats) and array_key_exists('0', $this->samcats)):
									foreach($this->samcats as $i => $cat): ?>
										<tr class="row<?php echo $i % 2; ?>">
									<!--1--><td>
												<?php echo utf8_encode($cat['name']); ?>
											</td>
									<!--2--><td style="text-align:center; padding:0 0 0 15px;">
												<input type="checkbox" id="samcatview_<?php echo $cat['ID'] ?>" class="samViewMe" onchange="samCatViewCheckbox();" value="'<?php echo $cat['ID'] ?>',"/>
											</td>
									<!--3--><td style="text-align:center; padding:0 0 0 15px;">
												<input type="checkbox" id="samcatrequ_<?php echo $cat['ID'] ?>" class="samReqMe" onchange="samCatReqCheckbox();" value="'<?php echo $cat['ID'] ?>',"/>
											</td>
										</tr><?php
									endforeach;
								else: ?>
									<tr>
										<td class="jsm_nodata" colspan="3" style="text-align:center;"><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVT_026'); ?></td>
									</tr><?php
								endif; ?>
							</tbody>
						</table>
					</fieldset>
				</td>
			</tr>
		</tbody>
		<tfoot></tfoot>
	</table>
	<div>
		<input type="hidden" name="task" value="" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
	<div class="clr"></div>
	<script>
		window.onload = onLoadReqevt();
	</script>
</form>
<div class="clr"></div>